#include <stdio.h>
int p(int n)
{int flag=0;
int t;
int z;
int sum=0;
z=n;
do{t=n%10;
n=n/10;
sum=sum*10+t;
}while(n!=0);
   if (sum==z)
   {flag=1;}
   return flag;

}
int main()
{int a,b;
int i;
scanf("%d %d",&a,&b);
for(i=a;i<=b;i++)
{
if(p(i)==1&&i%2==0)
{printf("%d\n",i);}
}

    return 0;
}
